# Copyright (C) 2012-2021  CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#

##
# Common packages
##
ADD_SUBDIRECTORY(CASCatch)
ADD_SUBDIRECTORY(Qtx)
IF(SALOME_GUI_ENABLE_QTXWEBBROWSER)
  ADD_SUBDIRECTORY(HelpBrowser)
ENDIF()
ADD_SUBDIRECTORY(Style)
ADD_SUBDIRECTORY(DDS)
ADD_SUBDIRECTORY(QDS)
ADD_SUBDIRECTORY(ObjBrowser)
ADD_SUBDIRECTORY(SUIT)
ADD_SUBDIRECTORY(SUITApp)
ADD_SUBDIRECTORY(STD)
ADD_SUBDIRECTORY(CAF)
ADD_SUBDIRECTORY(CAM)
ADD_SUBDIRECTORY(LogWindow)
ADD_SUBDIRECTORY(Prs)
ADD_SUBDIRECTORY(Event)
ADD_SUBDIRECTORY(ViewerData)
ADD_SUBDIRECTORY(ViewerTools)
ADD_SUBDIRECTORY(ImageComposer)
ADD_SUBDIRECTORY(GUI_PY)

##
# SALOME object
##
IF(SALOME_USE_SALOMEOBJECT)
  ADD_SUBDIRECTORY(OBJECT)
ENDIF(SALOME_USE_SALOMEOBJECT)

##
# OpenGL utils
##
IF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
  ADD_SUBDIRECTORY(OpenGLUtils)
ENDIF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)

##
# GL viewer
##
IF(SALOME_USE_GLVIEWER)
  ADD_SUBDIRECTORY(GLViewer)
ENDIF(SALOME_USE_GLVIEWER)

##
# VTK viewer
##
IF(SALOME_USE_VTKVIEWER)
  ADD_SUBDIRECTORY(VTKViewer)
  IF(SALOME_USE_SALOMEOBJECT)
    ADD_SUBDIRECTORY(SVTK)
  ENDIF(SALOME_USE_SALOMEOBJECT)
ENDIF(SALOME_USE_VTKVIEWER)

##
# OCC viewer
##
IF(SALOME_USE_OCCVIEWER)
  ADD_SUBDIRECTORY(OCCViewer)
  IF(SALOME_USE_SALOMEOBJECT)
    ADD_SUBDIRECTORY(SOCC)
  ENDIF(SALOME_USE_SALOMEOBJECT)
ENDIF(SALOME_USE_OCCVIEWER)

##
# Plot2d viewer
##
IF(SALOME_USE_PLOT2DVIEWER)
  ADD_SUBDIRECTORY(Plot2d)
  IF(SALOME_USE_SALOMEOBJECT)
    ADD_SUBDIRECTORY(SPlot2d)
  ENDIF(SALOME_USE_SALOMEOBJECT)
ENDIF(SALOME_USE_PLOT2DVIEWER)

##
# Qx scene viewer
##
IF(SALOME_USE_QXGRAPHVIEWER)
  ADD_SUBDIRECTORY(QxScene)
ENDIF(SALOME_USE_QXGRAPHVIEWER)

# Graphics viewer
##
IF(SALOME_USE_GRAPHICSVIEW)
  ADD_SUBDIRECTORY(GraphicsView)
ENDIF(SALOME_USE_GRAPHICSVIEW)

# ParaView Viewer
IF(SALOME_USE_PVVIEWER)
  ADD_SUBDIRECTORY(PVViewer)
  ADD_SUBDIRECTORY(PVServerService)
ENDIF()

##
# Python Viewer
##
IF(SALOME_USE_PYVIEWER)
  ADD_SUBDIRECTORY(PyViewer)
ENDIF(SALOME_USE_PYVIEWER)

##
# Python-based packages, part 1 (generic)
##
IF(SALOME_USE_PYCONSOLE)
  ADD_SUBDIRECTORY(SALOME_PYQT)
ENDIF(SALOME_USE_PYCONSOLE)


##
# Light SALOME packages
##
ADD_SUBDIRECTORY(LightApp)

##
# Python-based packages, part 2 (LightApp-dependent)
##
IF(SALOME_USE_PYCONSOLE) 
  IF(SALOME_USE_VTKVIEWER)
    ADD_SUBDIRECTORY(SALOME_PY)
  ENDIF(SALOME_USE_VTKVIEWER)
  IF(SALOME_USE_SALOMEOBJECT)
    ADD_SUBDIRECTORY(SALOME_SWIG)
  ENDIF(SALOME_USE_SALOMEOBJECT)
ENDIF(SALOME_USE_PYCONSOLE)

##
# Full (CORBA) SALOME packages
##
IF(NOT SALOME_LIGHT_ONLY)
  ADD_SUBDIRECTORY(TOOLSGUI)
  ADD_SUBDIRECTORY(SalomeApp)
  ADD_SUBDIRECTORY(Session)
  ADD_SUBDIRECTORY(GuiHelpers)
  ADD_SUBDIRECTORY(TreeData)
ENDIF(NOT SALOME_LIGHT_ONLY)
